import request from '@/utils/request'

// 查询库存变动记录列表
export function listRecord(query) {
    return request({
        url: '/system/record/list',
        method: 'get',
        params: query
    })
}

// 查询库存变动记录详细
export function getRecord(id) {
    return request({
        url: '/system/record/' + id,
        method: 'get'
    })
}

// 新增库存变动记录
export function addRecord(data) {
    return request({
        url: '/system/record',
        method: 'post',
        data: data
    })
}

// 修改库存变动记录
export function updateRecord(data) {
    return request({
        url: '/system/record',
        method: 'put',
        data: data
    })
}

// 删除库存变动记录
export function delRecord(id) {
    return request({
        url: '/system/record/' + id,
        method: 'delete'
    })
}

// 导出库存变动记录
export function exportRecord(query) {
    return request({
        url: '/system/record/export',
        method: 'get',
        params: query
    })
}

// 审核库存变动记录
export function approveRecord(data) {
    return request({
        url: '/system/record/approve',
        method: 'put',
        data: data
    })
}

// 取消审核库存变动记录
export function cancelRecord(data) {
    return request({
        url: '/system/record/cancel',
        method: 'put',
        data: data
    })
} 